﻿// 6 人以群分 (15分).cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。
//

#include <iostream>
#include<algorithm>
using namespace std;
int main()
{
	long n;
	int  i, j, k;
	cin >> n;
    long *a=new long[n];
	long total=0;
	long total_left = 0;
	
	for (i = 0; i < n; i++)
	{
		cin >> a[i];
		total = total + a[i];
	}
	sort(a, a + n);
	if(n%2)//n是奇数
	{
		for (i = 0; i < ((n-1) / 2); i++)
		{
			total_left = total_left + a[i];
		}

		if (abs(total_left - (total - total_left)) > abs(total_left - (total - total_left) + 2 * a[i]))
		{
			cout << "Outgoing #: " << ((n + 1) / 2) << endl;
			cout << "Introverted #: " << ((n - 1) / 2) << endl;
			cout << "Diff = " << abs(total_left - (total - total_left));
		}
		else
		{
			cout << "Outgoing #: " << ((n - 1) / 2) << endl;
			cout << "Introverted #: " << ((n + 1) / 2) << endl;
			cout << "Diff = " << abs(total_left - (total - total_left)+ 2 * a[i]);
		}
	}

	
	else
	{
		for (i = 0; i < (n/2); i++)
		{
			total_left= total_left+ a[i];
		}
		cout << "Outgoing #: " << (n / 2)<<endl;
		cout << "Introverted #: "<< (n / 2) << endl;
		cout << "Diff = "<<abs(total_left - (total - total_left));
	}

}

